package com.ywq.wechatordersys.utils;

import com.ywq.wechatordersys.VO.Result;

public class ResultUtils {

    public static Result success(Object object) {
        Result result = new Result();

        result.setMessage("成功");
        result.setCode(0);
        result.setData(object);
        return result;
    }

    public static Result success() {

        return success(null);
    }

    public static Result fail(int code ,String message) {
        Result result = new Result();
        result.setMessage(message);
        result.setCode(code);
        return result;
    }

}
